feat: Added cloud.resource_id, faas.id and aws.lambda.invoked_arn rules for Otel Lambda relationships#3049
Open
Sashwatdas123 wants to merge 4 commits into
Open
feat: Added cloud.resource_id, faas.id and aws.lambda.invoked_arn rules for Otel Lambda relationships#3049Sashwatdas123 wants to merge 4 commits into
Sashwatdas123 wants to merge 4 commits into
Conversation
entityBot
requested changes
Jul 15, 2026
entityBot
left a comment
Collaborator
There was a problem hiding this comment.
beep boop bop.
I have found some errors processing these changes:
- No valid, approved ARB ticket found in the PR description. This PR has to be reviewed by the API Review Board, please include a link to the ticket of that review in the PR description. Check how to start the process here or reach
#api-review-boardchannel in case of doubts
alanwest
reviewed
Jul 17, 2026
Comment on lines
+29
to
+34
| - name: extServiceCallsAwsLambdaAlias_CloudResourceId | ||
| version: "1" | ||
| origins: | ||
| - Distributed Tracing | ||
| - OpenTelemetry | ||
| conditions: |
Member
There was a problem hiding this comment.
In the plan I shared, the new rules should have the following precedence:
- Manual
newrelic.aws_metric_streams.arn(highest — explicit customer intent) aws.lambda.invoked_arn— preferred native, because it is the attribute defined to carry the full (alias-preserving) ARN- cloud.resource_id
- faas.id (legacy native)
As the PR currently stands, it's possible for multiple rules to match in the event that the datapoint contains more than one of these attributes.
To resolve this, you need additional conditions on each of these rules in order to enforce the precedence.
So, for example, this rule matching cloud.resource_id should be gated on:
- attribute: aws.lambda.invoked_arn
present: false
- attribute: newrelic.aws_metric_streams.arn
present: false
Member
There was a problem hiding this comment.
For completeness, here's how things should be gated for the other rules
- _InvokedArn: newrelic.aws_metric_streams.arn → present: false
- _CloudResourceId: aws.lambda.invoked_arn + newrelic.aws_metric_streams.arn → present: false
- _FaasId: cloud.resource_id + aws.lambda.invoked_arn + newrelic.aws_metric_streams.arn → present: false
Same conditions applies to the three rules in the other file as well.
entityBot
approved these changes
Jul 21, 2026
alanwest
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OTel Lambda services (
EXT-SERVICE) only link to their AWS Lambda entity via the manualnewrelic.aws_metric_streams.arnattribute. OTel already emits the ARN automatically (e.g.aws.lambda.invoked_arn,cloud.resource_id,faas.id), but no rule used them. This PR adds native relationship rules keyed off those attributes, with a defined precedence order to avoid duplicate relationships. The manual rule is untouched — purely additive and backward compatible.Changes
1.
relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAFUNCTION.ymlAdded 3 new rules (4 total). All share the function-ARN regex:
^arn:aws:lambda:([^:]*):([0-9]*):function:([^:]*)$present: false)_Explicit(unchanged)newrelic.aws_metric_streams.arn_InvokedArn(new)aws.lambda.invoked_arnnewrelic.aws_metric_streams.arnabsent_CloudResourceId(new)cloud.resource_idnewrelic.aws_metric_streams.arn+aws.lambda.invoked_arnabsent_FaasId(new)faas.id2.
relationships/synthesis/EXT-SERVICE-to-INFRA-AWSLAMBDAALIAS.ymlSame 4-rule structure with alias-ARN regex:
^arn:aws:lambda:([^:]*):([^:]*):function:([^:]*):([^/]*)$3.
entity-types/ext-service/definition.yml(ruleext_service_service_name_3)telemetry.sdk.versionttl: P1Dservice.namespacettl: P1Dfaas.namettl: P1Dfaas.idttl: P1Daws.lambda.invoked_arnttl: P1DPrecedence Design
Uses cascading
present: falseconditions so only one rule fires per datapoint, preventing duplicate relationships:Priority order: Manual (
aws_metric_streams.arn) →aws.lambda.invoked_arn→cloud.resource_id→faas.idRationale: Intent > Specificity > Recency > Legacy
aws.lambda.invoked_arn— OTel attribute purpose-built for Lambda, preserves full invoked ARN including alias/versioncloud.resource_id— modern OTel generic cloud resource identifierfaas.id— legacy OTel FaaS attribute, superseded but still emitted by older instrumentationIn practice each language emits exactly one attribute, so precedence is a safety measure:
aws.lambda.invoked_arn(its only ARN attribute)cloud.resource_idfaas.idNotes
expires: PT75Mon all rules — matches existing_Explicitrulecloud.resource_idtag mapping tracked separately in feat: Added cloud.resource_id with TTL to external service entity def… #3035 — this PR only adds its relationship ruleARB
ARB ticket: https://new-relic.atlassian.net/browse/NR-590700